package com.my.webhr.pro.service.Impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.my.webhr.pro.mapper.DepartmentMapper;
import com.my.webhr.pro.pojo.Department;
import com.my.webhr.pro.service.DepartmentService;
@Service
public class DepartmentServiceImpl implements DepartmentService {
	@Autowired
	private DepartmentMapper departmentMapper;
	@Override
	public int deleteOne(int dId) {
		return departmentMapper.deleteByPrimaryKey(dId);
	}

	@Override
	public int modifyOne(Department department) {
		return departmentMapper.updateByPrimaryKeySelective(department);
	}

	@Override
	public int updateOne(Department department) {
		return departmentMapper.insertSelective(department);
	}

	@Override
	public int selectCount(Department department) {
		return departmentMapper.selectCount(department);
	}

	@Override
	public Department selectSame(Department department) {
		return departmentMapper.selectSame(department);
	}

}
